Taming Message Passing: Efficient Method Look-Up for Dynamically Typed Languages
نویسندگان
چکیده
Method look-up for dynamically typed object-oriented languages, such as SMALLTALK-80 or OBJECTIVE-C, is usually implemented by a cached inheritance search. Unfortunately, this technique is slow. A selector-indexed dispatch table implementation speeds up messages to within 10% of the speed of a statically typed language such as C++. We present a fast technique for generating compact selector-indexed dispatch tables.
منابع مشابه
Compact Dispatch Tables for Dynamically Typed Object Oriented Languages
Dynamically typed object-oriented languages must perform dynamic binding for most message sends. Typically this is slow. A number of papers have reported on attempts to adapt C++-style selector table indexing to dynamically typed languages, but it is difficul to generate space-efficient tables. Our algorithm generates considerably smaller dispatch tables for languages with single inheritance th...
متن کاملDesign and Implementation of Concurrent C0
Concurrent C0 is a type-safe, C-like language with session-typed communication that makes writing highly concurrent, message passing programs easier, safer, and more efficient than other languages. Concurrent C0 presents a novel interpretation of a forwarding operation which allows channels to be combined in a well-defined way. We provide Cand Go-based implementations with language based optimi...
متن کاملThe Theory of Classification, Part 4: Object Types and Subtyping
This is the fourth article in a regular series on object-oriented type theory, aimed specifically at non-theoreticians. The "Theory of Classification" will explain the behaviour of languages such as Smalltalk, C++, Eiffel and Java in a consistent framework, modelling features such as classes, inheritance, polymorphism, message passing, method combination and templates or generic parameters. So ...
متن کاملOptimizing Dynamically-Typed Object-Oriented Languages With Polymorphic Inline Caches
Polymorphic inline caches (PICs) provide a new way to reduce the overhead of polymorphic message sends by extending inline caches to include more than one cached lookup result per call site. For a set of typical object-oriented SELF programs, PICs achieve a median speedup of 11%. As an important side effect, PICs collect type information by recording all of the receiver types actually used at a...
متن کاملMessage Analysis for Concurrent Languages
We describe an analysis-driven storage allocation scheme for concurrent languages that use message passing with copying semantics. The basic principle is that in such a language, data which is not part of any message does not need to be allocated in a shared data area. This allows for deallocation of threadspecific data without requiring global synchronization and often without even triggering ...
متن کامل